
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <!-- Basic Page Needs
    ================================================== -->
    <meta charset="utf-8">
    <!--[if IE]><meta http-equiv="x-ua-compatible" content="IE=9" /><![endif]-->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Tell a Story</title>
    <!-- Favicons
    ================================================== -->
    <link rel="shortcut icon" href="${pageContext.request.contextPath}/res/img/favicon.ico" type="image/x-icon">
    <link rel="apple-touch-icon" href="${pageContext.request.contextPath}/res/img/apple-touch-icon.png">
    <link rel="apple-touch-icon" sizes="72x72" href="${pageContext.request.contextPath}/res/img/apple-touch-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="114x114" href="${pageContext.request.contextPath}/res/img/apple-touch-icon-114x114.png">

    <!-- Bootstrap -->
    <link rel="stylesheet" type="text/css"  href="${pageContext.request.contextPath}/res/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/res/fonts/font-awesome/css/font-awesome.css">

    <!-- Nivo Lightbox
    ================================================== -->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/res/css/nivo-lightbox.css" >
    <link rel="stylesheet" href="${pageContext.request.contextPath}/res/css/nivo_lightbox_themes/default/default.css">

    <!-- Slider
    ================================================== -->
    <link href="${pageContext.request.contextPath}/res/css/owl.carousel.css" rel="stylesheet" media="screen">
    <link href="${pageContext.request.contextPath}/res/css/owl.theme.css" rel="stylesheet" media="screen">

    <!-- Stylesheet
    ================================================== -->
    <link rel="stylesheet" type="text/css"  href="${pageContext.request.contextPath}/res/css/style.css">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/res/css/responsive.css">


    <script type="text/javascript" src="${pageContext.request.contextPath}/res/js/modernizr.custom.js"></script>
    <script src="${pageContext.request.contextPath}/res/js/jquery-1.11.2.min.js"></script>
    <script src="${pageContext.request.contextPath}/res/js/bootstrap.js"></script>
    <script>
        var onPageNum;
        $(function(){
            onPageNum = 1;
        });
        function page(goPage) {
            if(goPage=="next"){
                onPageNum = onPageNum+1;
            }
            else if(goPage=="prev"){
                if(onPageNum<=1) return ;
                else onPageNum = onPageNum-1;
            }
            var columnID = '${columnID}';
            var params = {
                columnID:columnID,
                pageNum : onPageNum,
                whatPage: "main"
            };
            $.ajax({
                type: "POST",
                url: "/columnArticle/goPage",
                data: params,
                dataType:"html", //ajax返回值设置为text（json格式也可用它返回，可打印出结果，也可设置成json）
                success: function(data){
                    var columnDTOList = $(data).find("#columnDTOList");

                    if(columnDTOList.html()!=null){
                        $("#column").empty();
                        $("#column").append(columnDTOList).html();
                    }
                    else{
                        onPageNum=onPageNum-1;
                    }
                },
                error: function(data){
                    alert("服务器错误! data="+data);
                    return false;
                }
            });
        }// end function page
    </script>
</head>
<body>
<!-- Main Navigation
================================================== -->

<jsp:include   page="../nav.jsp" flush="true"/>



<!--  Blog Section
================================================== -->
<div id="tf-blog" class="blog">
    <div class="container"> <!-- container -->
        <div class="section-header">
            <h2> <span class="highlight"><strong>${columnDTO.columnName}</strong></span></h2>
            <h5><em></em></h5>
            <div class="fancy"><span><img src="${pageContext.request.contextPath}/res/img/favicon.ico" alt="..."></span></div>
        </div>
    </div>

    <div id="blog-post"> <!-- fullwidth gray background -->
        <div class="container"><!-- container -->

            <div class="row"> <!-- row -->
                <div class="col-md-6 col-md-offset-1"> <!-- Left Blogrol col 8 -->
                    <div id="column">
                        <c:if test="${columnArticleList==null}">
                            <h5 class="media-heading"><strong>这个专栏还没有发表任何文章</strong></h5>
                        </c:if>

                        <c:forEach  var="columnArticle"   items="${columnArticleList}" varStatus="vs">
                            <div id="columnDTOList" class="post-wrap"> <!-- Post Wrapper -->
                                <div class="media post"> <!-- post wrap -->
                                    <div class="media-left">
                                    </div>
                                    <div class="media-body">
                                        <p class="small">${columnArticle.genTime}</p>
                                        <a href="/columnArticle/goColumnArticlePost?articleID=${columnArticle.articleID}">
                                            <h5 class="media-heading"><strong>${columnArticle.articleName}</strong></h5>
                                        </a>
                                        <p>${columnArticle.articleContent}</p>
                                    </div>
                                </div><!-- end post wrap -->

                                <div class="post-meta"> <!-- Meta details -->
                                    <ul class="list-inline metas pull-left"> <!-- post metas -->
                                        <li><a href="#">${columnArticle.commentNum}</a></li> <!-- meta comments -->
                                        <li><a href="#">Read More</a></li> <!-- read more link -->
                                    </ul>
                                    <ul class="list-inline meta-detail pull-right"> <!-- user meta interaction -->
                                        <li><i class="fa fa-eye"></i> ${columnArticle.readNum}</li> <!-- no. of views -->
                                    </ul>
                                </div><!-- end Meta details -->
                            </div><!-- end Post Wrapper -->

                        </c:forEach>


                    </div>
                    <c:if test="${columnArticleList!=null}">
                        <div class="text-left"> <!-- Blogrol Pagination -->
                            <nav>
                                <ul class="pagination">
                                    <li>
                                        <a href="" aria-label="Previous" onclick="page('prev');return false">
                                            <span aria-hidden="true">Prev</span>
                                        </a>
                                    </li>

                                    <li>
                                        <a href="" aria-label="Next" onclick="page('next');return false">
                                            <span aria-hidden="true" >Next</span>
                                        </a>
                                    </li>
                                </ul>
                            </nav>
                        </div>
                    </c:if>
                </div> <!-- end Left content col 8 -->

                <div class="col-md-4"> <!-- Blog Sidebar -->
                    <div class="sidebar">

                        <div class="widget search"> <!-- Search Widget -->
                            <div class="input-group">
                                <input type="text" class="form-control" placeholder="Search for...">
                                <span class="input-group-btn">
                                        <button class="btn btn-default" type="button"><span class="fa fa-search"></span></button>
                                    </span>
                            </div><!-- /input-group -->
                        </div> <!-- end Search Widget -->

                        <div class="widget categories"> <!-- Category Widget -->
                            <h4 class="text-uppercase">Category</h4>
                            <ul class="list-unstyled bullet-lists">
                                <li><a href="#"><span class="fa fa-circle"></span> Web Design</a></li>
                                <li><a href="#"><span class="fa fa-circle"></span> WordPress</a></li>
                                <li><a href="#"><span class="fa fa-circle"></span> Graphics Design</a></li>
                                <li><a href="#"><span class="fa fa-circle"></span> Branding</a></li>
                                <li><a href="#"><span class="fa fa-circle"></span> Marketing</a></li>
                                <li><a href="#"><span class="fa fa-circle"></span> Business</a></li>
                                <li><a href="#"><span class="fa fa-circle"></span> Outsourcing</a></li>
                            </ul>
                        </div>

                        <div class="widget archive"> <!-- Archive Widget -->
                            <h4 class="text-uppercase">Archives</h4>
                            <ul class="list-unstyled bullet-lists">
                                <li><a href="#"><span class="fa fa-circle"></span> March 2015</a></li>
                                <li><a href="#"><span class="fa fa-circle"></span> February 2015</a></li>
                                <li><a href="#"><span class="fa fa-circle"></span> January 2015</a></li>
                                <li><a href="#"><span class="fa fa-circle"></span> December 2015</a></li>
                                <li><a href="#"><span class="fa fa-circle"></span> November 2015</a></li>
                                <li><a href="#"><span class="fa fa-circle"></span> October 2015</a></li>
                                <li><a href="#"><span class="fa fa-circle"></span> September 2015</a></li>
                            </ul>
                        </div>

                        <div class="widget post-tab"> <!-- Posts Tab Widget -->
                            <div role="tabpanel">

                                <!-- Nav tabs -->
                                <ul class="nav nav-tabs" role="tablist">
                                    <li role="presentation" class="active"><a href="#popular" aria-controls="popular" role="tab" data-toggle="tab">Popular</a></li><!-- Popular Posts -->
                                    <li role="presentation"><a href="#recent" aria-controls="recent" role="tab" data-toggle="tab">Recent</a></li><!-- Recent Posts -->
                                    <li role="presentation"><a href="#comment" aria-controls="comment" role="tab" data-toggle="tab">Comment</a></li><!-- Comments -->
                                </ul>

                                <!-- Tab panes -->
                                <div class="tab-content">
                                    <div role="tabpanel" class="tab-pane active" id="popular"><!-- Popular Posts -->
                                        <div class="list-group">
                                            <a href="#" class="list-group-item">
                                                <p class="small">January 27, 2015</p>
                                                <h5 class="media-heading"><strong>Condimentum aliquam, mollit magna velit nec et scelerisque</strong></h5>
                                            </a>
                                            <a href="#" class="list-group-item">
                                                <p class="small">January 14, 2015</p>
                                                <h5 class="media-heading"><strong>Pellentesque vehicula. Eget sed, dapibus. Vel et scelerisque donec et</strong></h5>
                                            </a>
                                            <a href="#" class="list-group-item">
                                                <p class="small">Feb 12, 2015</p>
                                                <h5 class="media-heading"><strong>Et scelerisque vestibulum. Condimentum aliquam, mollit magna velit nec</strong></h5>
                                            </a>
                                            <a href="#" class="list-group-item">
                                                <p class="small">January 14, 2015</p>
                                                <h5 class="media-heading"><strong>Scelerisque vestibulum Condimentum aliquam, mollit magna velit nec</strong></h5>
                                            </a>
                                            <a href="#" class="list-group-item">
                                                <p class="small">December 19, 2015</p>
                                                <h5 class="media-heading"><strong>Vel donec et scelerisque vestibulum. Condimentum aliquam, mollit magna velit nec</strong></h5>
                                            </a>
                                        </div>
                                    </div>
                                    <div role="tabpanel" class="tab-pane" id="recent"><!-- Recent Posts -->
                                        <div class="list-group">
                                            <a href="#" class="list-group-item">
                                                <p class="small">January 14, 2015</p>
                                                <h5 class="media-heading"><strong>Vel donec et scelerisque vestibulum. Condimentum aliquam, mollit magna velit nec</strong></h5>
                                            </a>
                                            <a href="#" class="list-group-item">
                                                <p class="small">January 14, 2015</p>
                                                <h5 class="media-heading"><strong>Vel donec et scelerisque vestibulum. Condimentum aliquam, mollit magna velit nec</strong></h5>
                                            </a>
                                            <a href="#" class="list-group-item">
                                                <p class="small">January 14, 2015</p>
                                                <h5 class="media-heading"><strong>Vel donec et scelerisque vestibulum. Condimentum aliquam, mollit magna velit nec</strong></h5>
                                            </a>
                                            <a href="#" class="list-group-item">
                                                <p class="small">January 14, 2015</p>
                                                <h5 class="media-heading"><strong>Vel donec et scelerisque vestibulum. Condimentum aliquam, mollit magna velit nec</strong></h5>
                                            </a>
                                            <a href="#" class="list-group-item">
                                                <p class="small">January 14, 2015</p>
                                                <h5 class="media-heading"><strong>Vel donec et scelerisque vestibulum. Condimentum aliquam, mollit magna velit nec</strong></h5>
                                            </a>
                                        </div>
                                    </div>
                                    <div role="tabpanel" class="tab-pane" id="comment"><!-- Comments -->
                                        <div class="list-group">
                                            <a href="#" class="list-group-item">
                                                <p class="small">Ms. Lijoy <strong>Comments</strong> on:</p>
                                                <h5 class="media-heading"><strong>Vel donec et scelerisque vestibulum. Condimentum aliquam, mollit magna velit nec</strong></h5>
                                            </a>
                                            <a href="#" class="list-group-item">
                                                <p class="small">Coder Expert <strong>Comments</strong> on:</p>
                                                <h5 class="media-heading"><strong>Pellentesque vehicula. Eget sed, dapibus. Vel et scelerisque donec et</strong></h5>
                                            </a>
                                            <a href="#" class="list-group-item">
                                                <p class="small">Cool Design <strong>Comments</strong> on:</p>
                                                <h5 class="media-heading"><strong>Et scelerisque vestibulum. Condimentum aliquam, mollit magna velit nec</strong></h5>
                                            </a>
                                            <a href="#" class="list-group-item">
                                                <p class="small">Mark Szuckerburg <strong>Comments</strong> on:</p>
                                                <h5 class="media-heading"><strong>Scelerisque vestibulum Condimentum aliquam, mollit magna velit nec</strong></h5>
                                            </a>
                                            <a href="#" class="list-group-item">
                                                <p class="small">Ruji <strong>Comments</strong> on:</p>
                                                <h5 class="media-heading"><strong>Vel donec et scelerisque vestibulum. Condimentum aliquam, mollit magna velit nec</strong></h5>
                                            </a>
                                        </div>
                                    </div>
                                </div>

                            </div>
                        </div>

                        <div class="widget tags"> <!-- Tags Widget -->
                            <h4 class="text-uppercase">Tags</h4>
                            <ul class="list-inline bullet-lists">
                                <li><a href="#">web design</a></li>
                                <li><a href="#">business</a></li>
                                <li><a href="#">psd design</a></li>
                                <li><a href="#">themeforest</a></li>
                                <li><a href="#">wordpress</a></li>
                                <li><a href="#">responsive</a></li>
                                <li><a href="#">bootstrap</a></li>
                            </ul>
                        </div>


                    </div>
                </div><!-- end right content col 4 -->

            </div>

        </div><!-- end container -->
    </div> <!-- end fullwidth gray background -->
</div>

<!-- Footer
================================================== -->
<jsp:include   page="../foot.jsp" flush="true"/>


</body>
</html>
